fi.foyt.svg.svgdom.FNISVGRectElementController = Class.create(fi.foyt.svg.svgdom.FNISVGElementController, {
  initialize: function($super){
  },
  moveBy: function(element, x, y){
    try {  
    var elementBo = element.getBBox();
    this.moveTo(element, elementBo.x + x, elementBo.y + y);
  } catch (e) {
    throw new Error("FNISVGRectElementController::moveBy: " + e);
  } 
  },
  moveTo: function(element, x, y){
    try {  
    element.setAttribute('x', x);
      element.setAttribute('y', y);
  } catch (e) {
    throw new Error("FNISVGRectElementController::moveTo: " + e);
  }
  },
  resizeBy: function(element, scaleX, scaleY) {
    try {  
      var elementBo = element.getBBox();
    this.resizeTo(element, elementBo.width * scaleX, elementBo.height * scaleY);
  } catch (e) {
    throw new Error("FNISVGRectElementController::resizeBy: " + e);
  }
  },
  resizeTo: function(element, width, height){
    try {
    element.setAttribute('width', width);
      element.setAttribute('height', height);
  } catch (e) {
    throw new Error("FNISVGRectElementController::resizeTo: " + e);
  }
  },
  supports: function (operation) {
    return ((operation == fi.foyt.svg.svgdom.FNISVGElementController.OPERATION_MOVE)||(operation == fi.foyt.svg.svgdom.FNISVGElementController.OPERATION_RESIZE));
  }
});
 